import request from '@/config/axios'

// 企业积分分配流水 VO
export interface CompanyScoreRecordVO {
  id: number // 任务编号
  companyId: number // 企业ID
  payRecordId: number // 支付记录ID
  score: number // 分配积分
}

// 企业积分分配流水 API
export const CompanyScoreRecordApi = {
  // 查询企业积分分配流水分页
  getCompanyScoreRecordPage: async (params: any) => {
    return await request.get({ url: `/dlbz/company-score-record/page`, params })
  },

  // 查询企业积分分配流水详情
  getCompanyScoreRecord: async (id: number) => {
    return await request.get({ url: `/dlbz/company-score-record/get?id=` + id })
  },

  // 新增企业积分分配流水
  createCompanyScoreRecord: async (data: CompanyScoreRecordVO) => {
    return await request.post({ url: `/dlbz/company-score-record/create`, data })
  },

  // 修改企业积分分配流水
  updateCompanyScoreRecord: async (data: CompanyScoreRecordVO) => {
    return await request.put({ url: `/dlbz/company-score-record/update`, data })
  },

  // 删除企业积分分配流水
  deleteCompanyScoreRecord: async (id: number) => {
    return await request.delete({ url: `/dlbz/company-score-record/delete?id=` + id })
  },

  // 导出企业积分分配流水 Excel
  exportCompanyScoreRecord: async (params) => {
    return await request.download({ url: `/dlbz/company-score-record/export-excel`, params })
  }
}